import { systemController } from './../config/service/system.controller'
import { NetService } from '@core/http'
import { Injectable } from '@angular/core'
import { of } from 'rxjs'
// import paramsTypeList from '../../assets/json/paramType.json'
// import singleParamsTypeList from '../../assets/json/singleParamType.json'
// import mupParamsTypeList from '../../assets/json/mupParamType.json'
// import sysParamsTypeList from '../../assets/json/sysParamType.json'
// import rolesTypeList from '../../assets/json/rolesTypeList.json'
// import rolesList from '../../assets/json/rolesList.json'
// import rolesAuth from '../../assets/json/rolesAuth.json'
// import userAuth from '../../assets/json/userAuth.json'
// import userList from '../../assets/json/userList.json'
// import rolesLevelList from '../../assets/json/rolesLevelList.json'
// import quotaParamsTypeList from '../../assets/json/quotaParamType.json'
// import logList from '../../assets/json/log.json'

@Injectable()
export class ApiService {
  constructor(private net: NetService) {}
  public siginData: any = []

  public getSiginList(type?, parent?) {
    // this.siginData = this.siginData
    // .filter(x => type === undefined || x.type === type)
    // .filter(x => parent === undefined || x.parent === parent)
    return this.net.send({
      service: systemController.getSiginList
    })
  }
  public singleParamsTypeList(type?, parent?) {
    // return of(
    //   singleParamsTypeList
    //     .filter(x => type === undefined || x.type === type)
    //     .filter(x => parent === undefined || x.parent === parent)
    // )
    return this.net.send({
      service: systemController.singleParamsTypeList
    })
  }
  public mupParamsTypeList(type?, parent?) {
    // return of(
    //   mupParamsTypeList
    //     .filter(x => type === undefined || x.type === type)
    //     .filter(x => parent === undefined || x.parent === parent)
    // )
    return this.net.send({
      service: systemController.mupParamsTypeList
    })
  }
  public sysParamsTypeList(type?, parent?) {
    // return of(
    //   sysParamsTypeList
    //     .filter(x => type === undefined || x.type === type)
    //     .filter(x => parent === undefined || x.parent === parent)
    // )
    return this.net.send({
      service: systemController.sysParamsTypeList
    })
  }
  public getParamsTypeData(type?, parent?) {
    // return of(
    //   paramsTypeList
    //     .filter(x => type === undefined || x.type === type)
    //     .filter(x => parent === undefined || x.parent === parent)
    // )
    return this.net.send({
      service: systemController.getParamsTypeData
    })
  }
  public getRolesTypeList() {
    // return of(rolesTypeList)
    return this.net.send({
      service: systemController.getRolesTypeList
    })
  }
  public getRolesList() {
    // return of(rolesList)
    return this.net.send({
      service: systemController.getRolesList
    })
  }
  public getRolesAuth() {
    // return of(rolesAuth)
    return this.net.send({
      service: systemController.getRolesAuth
    })
  }
  public getUserAuth() {
    // return of(rolesAuth)
    return this.net.send({
      service: systemController.getRolesAuth
    })
  }
  public getUserList() {
    // return of(userList)
    return this.net.send({
      service: systemController.getUserList
    })
  }
  public getUserRoleList() {
    // return of(rolesLevelList)
     return this.net.send({
      service: systemController.getUserRoleList
    })
  }
  public getQuotaParamsTypeList(type?, parent?) {
    // return of(
    //   quotaParamsTypeList
    //     .filter(x => type === undefined || x.type === type)
    //     .filter(x => parent === undefined || x.parent === parent)
    // )
    return this.net.send({
      service: systemController.getQuotaParamsTypeList
    })
  }

  public getlogList() {
    // return of(logList)
    return this.net.send({
      service: systemController.getlogList
    })
  }

  public delParams() {
    return this.net.send({
      service: systemController.delParams
    })
  }

  public delParamsmore(){
    return this.net.send({
      service: systemController.delParamsmore
    })
  }

  public delparamzb(){
    return this.net.send({
      service: systemController.delparamzb
    })
  }
}
